/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package arkanoid;

import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
import p3as.cliente.Drawable;


public class DBPhase implements PhaseLoader{

    @Override
    public Drawable loadPhase(int phase) {
        FileInputStream fileInputStream = null;
        try {
            String filePath = "C:/Documents and Settings/Josue/Mis documentos/scenesGuardadas/F" + String.valueOf(phase) + ".txt";
            fileInputStream = new FileInputStream(filePath);
            ObjectInputStream inputStream = new ObjectInputStream(fileInputStream);
            Drawable drawable = (Drawable)  inputStream.readObject();
            return drawable;
        } catch (Exception ex) {
            Logger.getLogger(DBPhase.class.getName()).log(Level.SEVERE, null, ex);
        }  
        return null;
    }
    
}
